//
//  ChartView.h
//  ChartDemoX
//
//  Created by yuanpt on 17/5/6.
//  Copyright © 2017年 yuanpt. All rights reserved.
//

#import <UIKit/UIKit.h>

@class
ChartXAxisView,
ChartYAxisView,
ChartLine,
PopoverView,
ChartDrawView;

@interface ChartView : UIView

// Y
@property (nonatomic, copy) NSString *yAxisTitle;
@property (nonatomic, strong) UILabel *yAxisTitleLabel;
@property (nonatomic, strong) ChartYAxisView *yAxisView;


/**
 y 轴最大值
 */
@property (nonatomic, assign) CGFloat yMaxValue; // 120

/**
 每个数之间有多少个格子
 */
@property (nonatomic, assign) NSInteger yGridSplit; // 5

/**
 坐标递增差值 10
 */
@property (nonatomic, assign) CGFloat yGridValue; // 10


/**
 y 轴最小值
 */
@property (nonatomic, assign) CGFloat yMinValue; // 40


@property (nonatomic, strong) UIScrollView *scrollView;

@property (nonatomic, strong) ChartDrawView *drawView;


// x 相关

@property (nonatomic, copy) NSString *xAxisTitle;
@property (nonatomic, strong) UILabel *xAxisTitleLabel;
@property (nonatomic, strong) ChartXAxisView *xAxisView;

/**
 有多少小格
 */
@property (nonatomic, assign) NSInteger xGridSplit; // 4

/**
 大格差值
 */
@property (nonatomic, assign) CGFloat xGridValue; // 1

/**
 没个页，显示多少个
 */
@property (nonatomic, assign) CGFloat xPerScreen; //6

@property (nonatomic, assign) CGFloat xMaxValue; // 36

@property (nonatomic, assign) CGFloat xToday;

@property (nonatomic, strong) ChartLine *minLine;
@property (nonatomic, strong) ChartLine *maxLine;
@property (nonatomic, strong) ChartLine *normalLine;
@property (nonatomic, strong) ChartLine *recordLine;

@property (nonatomic, strong, readonly) UIBezierPath *closedPath;


@property (nonatomic, strong) PopoverView *popoverView;


@end
